package com.supostacks.domain.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.supostacks.domain.repository.IResourceInfoRepository;
import com.supostacks.domain.service.IResourceInfoService;
import com.supostacks.domain.vo.ResourceInfoVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ResourceInfoServiceImpl implements IResourceInfoService {

    @Resource
    IResourceInfoRepository resourceInfoRepository;

    @Override
    public String insert(ResourceInfoVo resourceInfoVo) {
        return resourceInfoRepository.insert(resourceInfoVo);
    }

    @Override
    public void deleteById(String id) {
        resourceInfoRepository.deleteById(id);
    }

    @Override
    public String updateById(ResourceInfoVo resourceInfoVo) {
        return resourceInfoRepository.updateById(resourceInfoVo);
    }

    @Override
    public ResourceInfoVo selectById(String id) {
        return resourceInfoRepository.selectById(id);
    }

    @Override
    public List<ResourceInfoVo> selectList(JSONObject option) {
        return resourceInfoRepository.selectList(option);
    }

    @Override
    public JSONObject selectByPage(JSONObject param,int pageNo,int pageSize) {
        return resourceInfoRepository.selectByPage(param,pageNo,pageSize);
    }
}
